package com.twu.biblioteca.Models;

import java.util.HashMap;

/**
 * Created with IntelliJ IDEA.
 * User: Aru
 * Date: 5/24/13
 * Time: 12:28 PM
 * To change this template use File | Settings | File Templates.
 */
public class User
{
    public String userName;
    private String password;
    private String emailId;

    public Boolean getLoggedIn() {
        return isLoggedIn;
    }

    public String getEmailId() {
        return emailId;
    }

    public void setEmailId(String emailId) {
        this.emailId = emailId;
    }

    public void setLoggedIn(Boolean loggedIn) {
        isLoggedIn = loggedIn;
    }

    public void LogOut()
    {
        this.setLoggedIn(false);
    }

    private Boolean isLoggedIn;

    public User(String userName,String password, String emailId, Boolean isLoggedIn)
    {
        this.userName = userName;
        this.password = password;
        this.emailId = emailId;
        this.setLoggedIn(isLoggedIn);
    }

    public Boolean validatePassword(String password)
    {
        Boolean isValid = false;
        if(this.password.equals(password))
            isValid = true;
        return isValid;
    }
}
